package com.vip.docker.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 配置中心测试
 *
 * @author LEON
 * @date
 */
@RestController
public class ConfigController {

    @Value("${bolingcavalry-desc:desc:from code}")
    private String desc;

    @GetMapping("/test")
    public String test(){
        return desc + new SimpleDateFormat(" [yyyy-mm-dd  HH:mm:ss]").format(new Date());
    }
}
